<template>
  <div id="search_container" style="z-index: 10240">
<!--/*    <el-row :gutter="20" style="margin: 10px; text-align: right">-->
<!--/*      <el-col :span="15" style="width: 200px; text-align: right">-->
        <el-input type="text" placeholder="请输入你要查找的关键词"
                  v-model="inputObject.userInput"
                  :id="inputObject.inputId"
                  @input="send"
                  style="width: 300px; margin: 5px;"
        />
<!--      </el-col>-->
<!--      <el-col :span="3">-->
        <el-button type="primary" plain id="searchBtn" @click="send">search</el-button>
<!--      </el-col>-->
<!--    </el-row>-->
  </div>
</template>

<script>
import bus from '@/bus/bus'
export default {
  name: "Search",
  data() {
    return {
      inputObject: {
        userInput: '',
        inputId: 'searchInput'
      }
    }
  },
  created() {

  },
  methods: {
    send(){
      bus.$emit('shareUserInput', this.inputObject)
      // console.log( this.inputObject )
    }
  },
  mounted() {
    this.send()
  }
}
</script>

<style scoped>
</style>